<template>
  <div>
    <el-dialog :visible="visible" width="80%">
      <div class="cont">
        <div class="t1">公告</div>
        <div class="t2">
          <div class="p">{{ info.createTime }}</div>
          <div class="p" v-html="info.noticeText"></div>

        </div>
        <div class="t3" @click="$emit('close')">确认</div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import apiService from '@/api/apiService';
export default {
  data() {
    return {
      info: {}
    }
  },
  props: {
    visible: {
      type: Boolean,
      default: false
    },
  },
  mounted() {
    apiService.get("/notice", {}).then(res => {
      this.info = res.data
      console.log(`output->res`, res)
    })
  },
}
</script>
<style scoped lang="scss">
.cont {
  min-height: 100px;
  background-color: #fff;
  background-image: url('@/assets/images/home_mobile_dialog_bg_03.jpg');
  background-repeat: no-repeat;
  background-size: 100% auto;
  padding-bottom: .3rem;

  .t3 {
    width: 90%;
    height: .4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin: 0 auto;
    background-color: #5288e8;
    border-radius: .5rem;
  }

  .t1 {
    font-size: .3rem;
    text-align: center;
    color: #fff;
    padding-top: .2rem;
    font-weight: bold;
    text-shadow: 0 2px 2px rgba(0, 0, 0, .26);
  }

  .t2 {
    background-color: #fff;
    border-radius: 10px;
    padding: .2rem;
    width: 90%;
    margin: .2rem auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .16);

    .p {
      text-align: center;
      font-size: .13rem;
      line-height: .25rem;
      color: #333;
      white-space: nowrap;

      &.r {
        color: #fe5858;
        margin-bottom: .04rem;

      }

      &.b {
        color: #5288e8;

      }

      .r {
        color: #fe5858;
      }

      .b {
        color: #5288e8;
      }

      .g {
        color: #51c28f;
      }
    }

  }


}

::v-deep .el-dialog__body {
  padding: 0;
}

::v-deep .el-dialog__header {
  display: none;
}

::v-deep .el-dialog__footer {
  display: none;
}
</style>